<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>@click</title>
    <style>
        #submit{
            padding: 4px 8px;
            background-color: deepskyblue;
        }
    </style>
</head>
<body>
<!--@click="{{count}}" 等价于 dataPlus方法 ；对于简单逻辑可以直接在标签中处理-->
<div id="app">
    <button id="submit" @click="{{count++}}">submit {{count}}</button>
</div>

<script src="vue/vue.js"></script>
<script>

    new Vue({
        el:"#app",
        data:{
            count:0
        },
        methods:{
            dataPlus:function () {
                //获取data中count的值
                this.count +=1;
            }
        }
    });

</script>
</body>
</html>